package com.wocai.jrt.orgadmin.issuers.model;

import java.util.Collection;
import java.util.Date;

import org.springframework.security.core.GrantedAuthority;

import com.vteba.security.publisher.security.user.PUserDetails;

public class Issuers implements PUserDetails{
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
     * order by 排序语句
     * 对应数据库表字段 issuers
     */
    private String orderBy;

    /**
     * 分页开始记录
     * 对应数据库表字段 issuers
     */
    private Integer start;

    /**
     * 分页大小
     * 对应数据库表字段 issuers
     */
    private int pageSize = 10;

    /**
     * 是否去重
     * 对应数据库表字段 issuers
     */
    private boolean distinct;

    /**
     * 对应数据库表字段 issuers.id
     */
    private String id;

    /**
     * 对应数据库表字段 issuers.name
     */
    private String name;

    /**
     * 对应数据库表字段 issuers.contacts
     */
    private String contacts;

    /**
     * 对应数据库表字段 issuers.contact_way
     */
    private String contactWay;

    /**
     * 对应数据库表字段 issuers.org_code
     */
    private String orgCode;

    /**
     * 对应数据库表字段 issuers.account
     */
    private String account;

    /**
     * 对应数据库表字段 issuers.password
     */
    private String password;

    /**
     * 对应数据库表字段 issuers.org_id
     */
    private String orgId;

    /**
     * 对应数据库表字段 issuers.create_time
     */
    private Date createTime;

    /**
     * 对应数据库表字段 issuers.modefied_time
     */
    private Date modefiedTime;

    /**
     * 对应数据库表字段 issuers.disable
     */
    private Boolean disable;
    
    private String passwordConfirm;
    
    private String userOldpasswd;

    public String getPasswordConfirm() {
		return passwordConfirm;
	}

	public void setPasswordConfirm(String passwordConfirm) {
		this.passwordConfirm = passwordConfirm;
	}

	/**
     * 设置 order by 排序语句
     */
    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    /**
     * 获得 order by 排序语句
     */
    public String getOrderBy() {
        return orderBy;
    }

    /**
     * 设置 start，分页开始记录
     */
    public void setStart(Integer start) {
        this.start = start;
    }

    /**
     * 获得 start，分页开始记录
     */
    public Integer getStart() {
        return start;
    }

    /**
     * 设置 pageSize，分页大小
     */
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    /**
     * 获得 pageSize，分页大小
     */
    public int getPageSize() {
        return pageSize;
    }

    /**
     * 设置 distinct，是否去重
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * 获得 distinct，是否去重
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * 获得字段 issuers.id 的值
     *
     * @return the value of issuers.id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置字段 issuers.id 的值
     *
     * @param id the value for issuers.id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获得字段 issuers.name 的值
     *
     * @return the value of issuers.name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置字段 issuers.name 的值
     *
     * @param name the value for issuers.name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获得字段 issuers.contacts 的值
     *
     * @return the value of issuers.contacts
     */
    public String getContacts() {
        return contacts;
    }

    /**
     * 设置字段 issuers.contacts 的值
     *
     * @param contacts the value for issuers.contacts
     */
    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    /**
     * 获得字段 issuers.contact_way 的值
     *
     * @return the value of issuers.contact_way
     */
    public String getContactWay() {
        return contactWay;
    }

    /**
     * 设置字段 issuers.contact_way 的值
     *
     * @param contactWay the value for issuers.contact_way
     */
    public void setContactWay(String contactWay) {
        this.contactWay = contactWay;
    }

    /**
     * 获得字段 issuers.org_code 的值
     *
     * @return the value of issuers.org_code
     */
    public String getOrgCode() {
        return orgCode;
    }

    /**
     * 设置字段 issuers.org_code 的值
     *
     * @param orgCode the value for issuers.org_code
     */
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /**
     * 获得字段 issuers.account 的值
     *
     * @return the value of issuers.account
     */
    public String getAccount() {
        return account;
    }

    /**
     * 设置字段 issuers.account 的值
     *
     * @param account the value for issuers.account
     */
    public void setAccount(String account) {
        this.account = account;
    }

    /**
     * 获得字段 issuers.password 的值
     *
     * @return the value of issuers.password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置字段 issuers.password 的值
     *
     * @param password the value for issuers.password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获得字段 issuers.org_id 的值
     *
     * @return the value of issuers.org_id
     */
    public String getOrgId() {
        return orgId;
    }

    /**
     * 设置字段 issuers.org_id 的值
     *
     * @param orgId the value for issuers.org_id
     */
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    /**
     * 获得字段 issuers.create_time 的值
     *
     * @return the value of issuers.create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置字段 issuers.create_time 的值
     *
     * @param createTime the value for issuers.create_time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获得字段 issuers.modefied_time 的值
     *
     * @return the value of issuers.modefied_time
     */
    public Date getModefiedTime() {
        return modefiedTime;
    }

    /**
     * 设置字段 issuers.modefied_time 的值
     *
     * @param modefiedTime the value for issuers.modefied_time
     */
    public void setModefiedTime(Date modefiedTime) {
        this.modefiedTime = modefiedTime;
    }

	public Boolean getDisable() {
		return disable;
	}

	public void setDisable(Boolean disable) {
		this.disable = disable;
	}

	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		return null;
	}

	@Override
	public String getUsername() {
		return account;
	}

	@Override
	public boolean isAccountNonExpired() {
		return isEnabled();
	}

	@Override
	public boolean isAccountNonLocked() {
		return isEnabled();
	}

	@Override
	public boolean isCredentialsNonExpired() {
		return isEnabled();
	}

	@Override
	public boolean isEnabled() {
		if (disable == false) {
			return true;
		}
		return false;
	}

	@Override
	public Long getUserId() {
		return null;
	}

	@Override
	public String getEmail() {
		return null;
	}

	@Override
	public Date getCreateDate() {
		return createTime;
	}

	@Override
	public String getTenantId() {
		return orgId;
	}

	@Override
	public String getTenantCode() {
		return orgCode;
	}

	public String getUserOldpasswd() {
		return userOldpasswd;
	}

	public void setUserOldpasswd(String userOldpasswd) {
		this.userOldpasswd = userOldpasswd;
	}

}